{% extends "base/base.html" %} {% load i18n %}
{% block main %}

        <div id="completetxt">
        <h1>{% trans "Your OpenID is verified! " %}</h1>
        {% blocktrans %}
        <p>Your OpenID can now be associated with a new or existing membership. You can change the association later in your preferences.</p>
        {% endblocktrans %}
        <br /><br />
        <h2>{% trans "Associate your OpenID" %}</h2>
        {% blocktrans %}
        <p>If you're just joining this site, associate your OpenID with a new account. If you're already a member, associate with your existing account.</p>
        {% endblocktrans %}
        </div>

        {% if form1.errors %}
        <p class="errors">{% trans "Please correct errors below:" %}<br />
                {% if form1.username.errors %}
                        <span class="error">{{ form1.username.errors|join:", " }}</span>
                {% endif %}
                {% if form1.email.errors %}
                        <span class="error">{{ form1.email.errors|join:", " }}</span>
                {% endif %}
        </p>
        {% endif %}
        {% if form2.errors %}
        <p class="errors">{% trans "Please correct errors below:" %}<br />
                {% if form2.username.errors %}
                        <span class="error">{{ form2.username.errors|join:", " }}</span>
                {% endif %}
                {% if form2.password.errors %}
                        <span class="error">{{ form2.password.errors|join:", " }}</span>
                {% endif %}
        </p>
        {% endif %}

        <div class="login">
        <form name="fregister" action="{% url user_register %}" method="POST">
            <input type="hidden" name="next" value="{{ next }}" />
                        <fieldset>
                                <legend>{% trans "A new account" %}</legend>
                                <div class="form-row"><label for="id_username">{% trans "Username" %}</label><br />{{ form1.username }}</div>
                                <div class="form-row"><label for="id_email">{% trans "Email" %}</label><br />{{ form1.email }}</div>
                                <div class="submit-row"><input type="submit" name="bnewaccount" value="{% trans "Create account" %}"></div>
                                <hr class="clear" />
                </fieldset>
                </form>
        </div>

        <div class="login">
        <form name="fverify" action="{% url user_register %}" method="POST">
            <input type="hidden" name="next" value="{{ next }}" />
                        <fieldset>
                                <legend>{% trans "An existing account" %}</legend>
                                <div class="form-row"><label for="id_username">{% trans "Username" %}</label><br />{{ form2.username }}</div>
                                <div class="form-row"><label for="id_passwordl">{% trans "Password" %}</label><br />{{ form2.password }}</div>
                                <div class="submit-row"><input type="submit" name="bverify" value="{% trans "Verify" %}"></div>
                        </fieldset>
                </form>
        </div>
{% endblock %}
